USE [OctoNetApps]
GO

/****** Object:  Table [classified].[ClassifiedAttributeValues]    Script Date: 05/25/2011 06:49:45 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [classified].[ClassifiedAttributeValues](
	[CategoryID] [bigint] NOT NULL,
	[AttributeID] [bigint] NOT NULL,
	[AttributeValue] [tinyint] NOT NULL,
	[AttributeValueName] [nvarchar](100) NOT NULL,
 CONSTRAINT [PK_ClassifiedAttributeValues] PRIMARY KEY CLUSTERED 
(
	[CategoryID] ASC,
	[AttributeID] ASC,
	[AttributeValue] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [classified].[ClassifiedAttributeValues]  WITH CHECK ADD  CONSTRAINT [FK_ClassifiedAttributeValues_ClassifiedAttributes] FOREIGN KEY([AttributeID], [CategoryID])
REFERENCES [classified].[ClassifiedAttributes] ([AttributeID], [CategoryID])
GO

ALTER TABLE [classified].[ClassifiedAttributeValues] CHECK CONSTRAINT [FK_ClassifiedAttributeValues_ClassifiedAttributes]
GO


